package tk.djcrazy.instantmessage.dao;

import java.util.List;

public interface IDao<T> {

	public T findById(Class<T> clazz, int id);

	public void create(T baseBean);

	public void save(T baseBean);

	public void delete(T baseBean);

	public List<T> queryList(String hql, int firstResult, int maxSize,
			Object... params);

	public List<T> queryList(String hql, Object... params);

	public int queryCount(String hql, Object... params);
	
	public T queryUnique(String hql, Object... params); 

  }
